<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<%@include file="../../common/taglib/taglib.jsp" %>
<%@include file="../common/dwz.jsp" %>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="${baseURL}/dwz/images/loginuser.png" type="image/png">
    <title>预警阈值表</title>
    <link href="${baseURL}/dwz/css/style.default.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/jquery.datatables.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/bootstrap-override.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/jquery-ui-1.10.3.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/weather-icons.min.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/animate.delay.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/animate.min.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/toggles.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/select2.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/lato.css" rel="stylesheet">
    <link href="${baseURL}/dwz/css/roboto.css" rel="stylesheet">

</head>
<body>
<section>
    <!-- 左侧导航栏开始-->
    <c:import url="../common/left.jsp"></c:import>
    <!-- 左侧导航栏结束-->
    <div class="mainpanel">

        <!-- 头导航栏开始-->
        <c:import url="../common/hander.jsp"></c:import>
        <!-- 头导航栏结束-->

        <div class="contentpanel">
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="contentpanel">
                        <div class="form-group">
                            <form action="${baseURL}/bizThreshold/threshold/1/3" method="get">
                                <div>
                                    <h5><i class="fa fa-file-text"></i>静挠度预警阈值表 </h5>
                                </div>
                                <h1 class="col-sm-2 control-label" style="padding-top:5px;font-size:20px;">预警等级:</h1>
                                <div class="col-sm-2" style="left: -5%">
                                    <!-- 样式1 -->
                                    <select name="level" class="form-control">
                                        <option value="">---请选择---</option>
                                        <option value="1">提醒</option>
                                        <option value="2">警告</option>
                                        <option value="3">报警</option>
                                    </select>
                                </div>
                                <h1 class="col-sm-2 control-label"
                                    style="padding-top:5px;font-size:20px;left: -4%">设备位置:</h1>
                                <div class="col-sm-2" style="left: -9%">
                                    <!-- 样式1 -->
                                    <select name="sensorPosition" class="form-control">
                                        <option value="">---请选择---</option>
                                        <option value="1跨跨中">1跨跨中</option>
                                        <option value="2跨跨中">2跨跨中</option>
                                        <option value="3跨跨中">3跨跨中</option>
                                        <option value="4跨跨中">4跨跨中</option>
                                        <option value="5跨跨中">5跨跨中</option>
                                        <option value="6跨跨中">6跨跨中</option>
                                        <option value="7跨跨中">7跨跨中</option>
                                        <option value="8跨跨中">8跨跨中</option>
                                        <option value="9跨跨中">9跨跨中</option>
                                        <option value="10跨跨中">10跨跨中</option>
                                        <option value="11跨跨中">11跨跨中</option>
                                        <option value="12跨跨中">12跨跨中</option>
                                        <option value="13跨跨中">13跨跨中</option>
                                        <option value="14跨跨中">14跨跨中</option>
                                        <option value="14跨支墩">14跨支墩</option>
                                    </select>
                                </div>
                                    <div>
                                        <button type="submit" style="right: 100%">查询</button>
                                        <a class="btn btn-info"
                                           href = "/bizThreshold/downExcel/3">生成Excel</a>
                                    </div>

                                    <form action="${baseURL}/bizThreshold/upExcel" method="post"
                                          enctype="multipart/form-data">
                                        <input value="上传Excel" type="submit">
                                        <input type="file" name="file">
                                    </form>
                            </form>
                        </div>

                        <div class="row">
                            <!-- 黑色表 -->

                            <div class="col-md-12">
                                <div class="table-responsive">
                                    <table class="table table-dark mb30">
                                        <tr>
                                            <th>预警等级</th>
                                            <th>位置</th>
                                            <th>数值</th>
                                            <th>升级系数</th>
                                            <th>操作时间</th>
                                            <th>操作</th>
                                        </tr>

                                        <tbody>

                                        <c:forEach items="${list.content}" var="ab">
                                            <tr>
                                                <td>
                                                    <c:if test="${ab.level == 2}">警告</c:if>
                                                    <c:if test="${ab.level == 1}">提醒</c:if>
                                                    <c:if test="${ab.level == 3}">报警</c:if>
                                                </td>
                                                <td>${ab.sensorPosition}</td>
                                                <td>${ab.value}</td>
                                                <td>${ab.ratio}</td>
                                                <td>${ab.updateDate}</td>
                                                <td>
                                                    <a class="btn btn-success" href="/bizThreshold/findById/${ab.id}">修改</a>
                                                </td>
                                            </tr>
                                        </c:forEach>

                                        </tbody>

                                    </table>

                                    <a href="/bizThreshold/sensor/${goods.prePage}">前一页</a>
                                    <a href="/bizThreshold/threshold/1/3">1</a>
                                    <a href="/bizThreshold/threshold/2/3">2</a>
                                    <a href="/bizThreshold/threshold/3/3">3</a>
                                    <a href="/bizThreshold/threshold/4/3">4</a>
                                    <a href="/bizThreshold/threshold/5/3">5</a>
                                    <a href="/bizThreshold/threshold/6/3">6</a>
                                    <a href="/bizThreshold/threshold/${goods.nextPage}">下一页</a>

                                </div><!-- table-responsive -->
                            </div>
                        </div><!-- row -->
                    </div>
                </div><!-- panel-body -->
            </div><!-- panel -->
        </div><!-- contentpanel -->

        <div class="rightpanel">
            <!-- Nav tabs -->
            <ul class="nav nav-tabs nav-justified">
                <li class="active"><a href="#rp-alluser" data-toggle="tab"><i class="fa fa-users"></i></a></li>
                <li><a href="#rp-favorites" data-toggle="tab"><i class="fa fa-heart"></i></a></li>
                <li><a href="#rp-history" data-toggle="tab"><i class="fa fa-clock-o"></i></a></li>
                <li><a href="#rp-settings" data-toggle="tab"><i class="fa fa-gear"></i></a></li>
            </ul>
        </div><!-- rightpanel -->
    </div><!-- mainpanel -->
</section>
</body>

<script>
    function updateById(id) {
        debugger
        $.ajax({
            type: "get",
            url: "/bizThreshold/findById/" + id,
            data: {"id": id},
            success: function (data) {
                if (data.code == 0) {
                    alert()
                } else {
                    alert("")
                }
            }
        })
    }

</script>
</html>
